<template>
  <el-container id="aside">
    <vAsideSpace />
    <el-container>
      <el-header
        :height="head_height"
        :style="{ backgroundColor: head_background_color }"
      >
        <vHeadSpace />
      </el-header>
      <el-main id="main" :style="{ backgroundColor: main_background_color }">
        <HomeSpace />
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
export default {
  components: {
    HomeSpace: (resolve) => {
      require(["@/components/home/HomeSpace"], resolve);
    },
  },
  data() {
    return {
      update_data: {
        title: "更新日志",
        message: '',
      },
      head_background_color: this.$cookies.get("setting").head_background_color,
      head_height: this.$cookies.get("setting").head_height + "px",
      main_background_color: this.$cookies.get("setting").main_background_color,
    };
  },
  methods: {
    update_news() {
      this.$notify.info({
        title: this.update_data.title,
        dangerouslyUseHTMLString: true,
        message: this.update_data.message,
        duration:0,
      });
    },
    get_update_news(){
      this.$axios({
        method:"post",
        url:'/eui/data',
      }).then(response=>{
        this.update_data.message=response.data.update_content
        this.update_news()
      })
    }
  },
  mounted() {
    this.get_update_news();
  },
};
</script>
<style scoped>
#aside {
  height: 100vh;
}
#main {
  height: 100vh;
  overflow: auto;
}
/*滚动条的宽度*/
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

/*外层轨道。可以用display:none让其不显示，也可以添加背景图片，颜色改变显示效果*/
::-webkit-scrollbar-track {
  width: 6px;
  background-color: #f2f6fc;
  -webkit-border-radius: 2em;
  -moz-border-radius: 2em;
  border-radius: 2em;
}

/*滚动条的设置*/

::-webkit-scrollbar-thumb {
  background-color: #f56c6c;
  background-clip: padding-box;
  min-height: 1px;
  -webkit-border-radius: 2em;
  -moz-border-radius: 2em;
  border-radius: 2em;
}
/*滚动条移上去的背景*/

::-webkit-scrollbar-thumb:hover {
  background-color: #fff;
}
</style>